package com.asset.salesforce.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.apache.solr.analysis.LowerCaseFilterFactory;
import org.apache.solr.analysis.SnowballPorterFilterFactory;
import org.apache.solr.analysis.StandardTokenizerFactory;
import org.hibernate.search.annotations.Analyzer;
import org.hibernate.search.annotations.AnalyzerDef;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.IndexedEmbedded;
import org.hibernate.search.annotations.Parameter;
import org.hibernate.search.annotations.Store;
import org.hibernate.search.annotations.TokenFilterDef;
import org.hibernate.search.annotations.TokenizerDef;


/**
 * The persistent class for the account database table.
 * 
 */
@Table(name="account")
@Entity
@Indexed
@AnalyzerDef(name="accountAnalyzer", tokenizer = @TokenizerDef(factory=StandardTokenizerFactory.class),
filters={@TokenFilterDef(factory=LowerCaseFilterFactory.class),
        @TokenFilterDef(factory=SnowballPorterFilterFactory.class,params={
                @Parameter(name="language",value="English")
        })
})
public class Account implements Serializable {
	private static final long serialVersionUID = 1L;

	private Integer id;
	private Employee accountCreator;
	private String accountName;
	private Integer annualRevenue;
	private City city;
	private String companyName;
	private Country country;
	private Date dateCreated;
	private Date dateModified;
	private String description;
	private String email;
	private Integer empNum;
	private String fax;
	private String industry;
	private Boolean isDeleted;
	private Boolean isFollowed;
	private String mobile;
	private String phone;
	private String state;
	private String street;
	private String type;
	private String webSite;
	private String zipCode;
	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="account_id_seq")
	@SequenceGenerator(name="account_id_seq",sequenceName="account_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * @return the accountCreator
	 */
	@ManyToOne
	@JoinColumn(name="account_creator_id")
	@IndexedEmbedded
	public Employee getAccountCreator() {
		return accountCreator;
	}
	/**
	 * @param accountCreator the accountCreator
	 */
	public void setAccountCreator(Employee accountCreator) {
		this.accountCreator = accountCreator;
	}
	/**
	 * @return the accountName
	 */
	@Column(name="account_name")
	@Field(index=Index.YES,store=Store.NO)
	@Analyzer(definition = "accountAnalyzer")
	public String getAccountName() {
		return accountName;
	}
	/**
	 * @param accountName the accountName
	 */
	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}
	/**
	 * @return the phone
	 */
	@Column(name="phone")
	@Field(index=Index.YES,store=Store.NO)
	@Analyzer(definition = "accountAnalyzer")
	public String getPhone() {
		return phone;
	}
	/**
	 * @param phone the phone to set
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}
	/**
	 * @return the mobile
	 */
	@Column(name="mobile")
	@Field(index=Index.YES,store=Store.NO)
	@Analyzer(definition = "accountAnalyzer")
	public String getMobile() {
		return mobile;
	}
	/**
	 * @param mobile the mobile to set
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	/**
	 * @return the fax
	 */
	@Column(name="fax")
	public String getFax() {
		return fax;
	}
	/**
	 * @param fax the fax to set
	 */
	public void setFax(String fax) {
		this.fax = fax;
	}
	/**
	 * @return the webSite
	 */
	@Column(name="website")
	public String getWebSite() {
		return webSite;
	}
	/**
	 * @param webSite the webSite to set
	 */
	public void setWebSite(String webSite) {
		this.webSite = webSite;
	}
	/**
	 * @return the type
	 */
	@Column(name="type")
	public String getType() {
		return type;
	}
	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}
	/**
	 * @return the industry
	 */
	@Column(name="industry")
	public String getIndustry() {
		return industry;
	}
	/**
	 * @param industry the industry to set
	 */
	public void setIndustry(String industry) {
		this.industry = industry;
	}
	/**
	 * @return the email
	 */
	@Column(name="email")
	public String getEmail() {
		return email;
	}
	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}
	/**
	 * @return the country
	 */
	@ManyToOne
	@JoinColumn(name="country_id")
	public Country getCountry() {
		return country;
	}
	/**
	 * @param country the country to set
	 */
	public void setCountry(Country country) {
		this.country = country;
	}
	/**
	 * @return the city
	 */
	@ManyToOne
	@JoinColumn(name="city_id")
	public City getCity() {
		return city;
	}
	/**
	 * @param city the city to set
	 */
	public void setCity(City city) {
		this.city = city;
	}
	/**
	 * @return the state
	 */
	@Column(name="state")
	public String getState() {
		return state;
	}
	/**
	 * @param state the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}
	/**
	 * @return the street
	 */
	@Column(name="street")
	public String getStreet() {
		return street;
	}
	/**
	 * @param street the street to set
	 */
	public void setStreet(String street) {
		this.street = street;
	}
	/**
	 * @return the zipCode
	 */
	@Column(name="zip_code")
	public String getZipCode() {
		return zipCode;
	}
	/**
	 * @param zipCode the zipCode to set
	 */
	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}
	/**
	 * @return the empNum
	 */
	@Column(name="emp_num")
	public Integer getEmpNum() {
		return empNum;
	}
	/**
	 * @param empNum the empNum to set
	 */
	public void setEmpNum(Integer empNum) {
		this.empNum = empNum;
	}
	/**
	 * @return the annualRevenue
	 */
	@Column(name="ann_revenue")
	public Integer getAnnualRevenue() {
		return annualRevenue;
	}
	/**
	 * @param annualRevenue the annualRevenue to set
	 */
	public void setAnnualRevenue(Integer annualRevenue) {
		this.annualRevenue = annualRevenue;
	}
	/**
	 * @return the description
	 */
	@Column(name="description")
	public String getDescription() {
		return description;
	}
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	/**
	 * @return the isDeleted
	 */
	@Column(name="is_deleted")
	@Field(index=Index.YES,store=Store.NO)
	@Analyzer(definition = "accountAnalyzer")
	public Boolean getIsDeleted() {
		return isDeleted;
	}
	/**
	 * @param isDeleted the isDeleted to set
	 */
	public void setIsDeleted(Boolean isDeleted) {
		this.isDeleted = isDeleted;
	}
	/**
	 * @return the isFollowed
	 */
	@Transient
	public Boolean getIsFollowed() {
		return isFollowed;
	}
	/**
	 * @param isFollowed the isFollowed to set
	 */
	public void setIsFollowed(Boolean isFollowed) {
		this.isFollowed = isFollowed;
	}
	/**
	 * @return the dateCreated
	 */
	@Temporal(value = TemporalType.TIMESTAMP)
	@Column(name="date_created")
	@Field(index=Index.YES,store=Store.NO)
	@Analyzer(definition = "accountAnalyzer")
	public Date getDateCreated() {
		return dateCreated;
	}
	/**
	 * @param dateCreated the dateCreated to set
	 */
	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}
	/**
	 * @return the dateModified
	 */
	@Temporal(value = TemporalType.TIMESTAMP)
	@Column(name="date_modified")
	public Date getDateModified() {
		return dateModified;
	}
	/**
	 * @param dateModified the dateModified to set
	 */
	public void setDateModified(Date dateModified) {
		this.dateModified = dateModified;
	}
	/**
	 * @return the companyName
	 */
	@Column(name="company_name")
	@Field(index=Index.YES,store=Store.NO)
	@Analyzer(definition = "accountAnalyzer")
	public String getCompanyName() {
		return companyName;
	}
	/**
	 * @param companyName the companyName to set
	 */
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	
	

}